

import React from 'react'
import { inject, observer } from "mobx-react";

import { Table, Tag, Space, Button, Pagination  } from 'antd';
const { Column, ColumnGroup } = Table;


@inject('YouHuiJuan')
@observer
class YouHuiJuan extends React.Component {

    componentWillMount = () => {
        this.props.YouHuiJuan.updateTabData()
    }

    render() {
      let {tabDataAll} = this.props.YouHuiJuan
        console.log(tabDataAll)
        this.data = []
        const columns = [
            {
              title: 'youhuiju1an',
              dataIndex: 'youhuiju1an',
              key: 'youhuiju1an',
              render: text => <a>{text}</a>,
            },
            {
              title: 'type',
              dataIndex: 'type',
              key: 'type',
            },
            {
              title: 'money',
              dataIndex: 'money',
              key: 'money',
            },
            // {
            //   title: 'Tags',
            //   key: 'tags',
            //   dataIndex: 'tags',
            //   render: tags => (
            //     <>
            //       {tags.map(tag => {
            //         let color = tag.length > 5 ? 'geekblue' : 'green';
            //         if (tag === 'loser') {
            //           color = 'volcano';
            //         }
            //         return (
            //           <Tag color={color} key={tag}>
            //             {tag.toUpperCase()}
            //           </Tag>
            //         );
            //       })}
            //     </>
            //   ),
            // },
            {
              title: 'moneyXiaXian',
              dataIndex: 'moneyXiaXian',
              key: 'moneyXiaXian',
            },
            {
              title: 'faFangNum',
              dataIndex: 'faFangNum',
              key: 'faFangNum',
            },
            {
              title: 'Action',
              key: 'action',
              render: (text, record) => (
                <Space size="middle">
                  <a>Invite {record.name}</a>
                  <a>Delete</a>
                </Space>
              ),
            },
          ];

          let pagination = {
            defaultPageSize:5,
            position:['bottomCenter']
            // current:1,
            // total:10
          }
          

        return (
          <div>
            <Table dataSource={tabDataAll} pagination={pagination} columns={columns} />
          </div>
            // 
        )
    }

}

export default YouHuiJuan